<?php
include "../function.php";
include "../include/admin.class.php";
$pro=new Product();
$admin = new Admin();

if(isset($_GET['del'])){
	$pro->delType($_GET['del']);
}



if(isset($_POST['submit'])){
	$data = array("name" => $_POST['type'],
								"create_time" => date("Y-m-d H:i:s",time()),
								"father_id" => $_POST['type_id'],
								"create_user" => "liuzw");
	$x = $pro->addType($data);
}

$type = $pro->getTypes();
?>